// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_CONFIG
// * CreateDate    : 2014-06-05 18:30:28
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:28
// * LastChanger   : 2014-06-05 18:30:28
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class QcConfigEntity : EntityBase
    {
        public QcConfigTable TableSchema
        {
            get
            {
                return QcConfigTable.Current;
            }
		}
		
		public QcConfigEntity()
        {

        }
		
		public QcConfigEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.ConfigNo = Convert.ToString(CommonFunctions.ToObject(dr["CONFIG_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.MaterialCode = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_CODE"]));
			this.TypePur = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_PUR"]));
			this.TypeOther = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_OTHER"]));
			this.TypeShipment = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_SHIPMENT"]));
			this.TypeFinishedgoods = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_FINISHEDGOODS"]));
			this.TypeTechnic = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_TECHNIC"]));
			this.TypeOut = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_OUT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public QcConfigEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.ConfigNo = Convert.ToString(CommonFunctions.ToObject(dr["CONFIG_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.MaterialCode = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_CODE"]));
			this.TypePur = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_PUR"]));
			this.TypeOther = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_OTHER"]));
			this.TypeShipment = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_SHIPMENT"]));
			this.TypeFinishedgoods = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_FINISHEDGOODS"]));
			this.TypeTechnic = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_TECHNIC"]));
			this.TypeOut = Convert.ToString(CommonFunctions.ToObject(dr["TYPE_OUT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcConfigTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_ID)); }
            set { SetData(QcConfigTable.C_ID, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_CREATED_BY)); }
            set { SetData(QcConfigTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(QcConfigTable.C_CREATED_DATE)); }
            set { SetData(QcConfigTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_UPDATED_BY)); }
            set { SetData(QcConfigTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(QcConfigTable.C_UPDATED_DATE)); }
            set { SetData(QcConfigTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(QcConfigTable.C_IS_ACTIVE)); }
            set { SetData(QcConfigTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string ConfigNo
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_CONFIG_NO)); }
            set { SetData(QcConfigTable.C_CONFIG_NO, value); }
        }
		
        [DataMember]
        public string MaterialId
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_MATERIAL_ID)); }
            set { SetData(QcConfigTable.C_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public string MaterialName
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_MATERIAL_NAME)); }
            set { SetData(QcConfigTable.C_MATERIAL_NAME, value); }
        }
		
        [DataMember]
        public string MaterialCode
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_MATERIAL_CODE)); }
            set { SetData(QcConfigTable.C_MATERIAL_CODE, value); }
        }
		
        [DataMember]
        public string TypePur
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_TYPE_PUR)); }
            set { SetData(QcConfigTable.C_TYPE_PUR, value); }
        }
		
        [DataMember]
        public string TypeOther
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_TYPE_OTHER)); }
            set { SetData(QcConfigTable.C_TYPE_OTHER, value); }
        }
		
        [DataMember]
        public string TypeShipment
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_TYPE_SHIPMENT)); }
            set { SetData(QcConfigTable.C_TYPE_SHIPMENT, value); }
        }
		
        [DataMember]
        public string TypeFinishedgoods
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_TYPE_FINISHEDGOODS)); }
            set { SetData(QcConfigTable.C_TYPE_FINISHEDGOODS, value); }
        }
		
        [DataMember]
        public string TypeTechnic
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_TYPE_TECHNIC)); }
            set { SetData(QcConfigTable.C_TYPE_TECHNIC, value); }
        }
		
        [DataMember]
        public string TypeOut
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_TYPE_OUT)); }
            set { SetData(QcConfigTable.C_TYPE_OUT, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_REMARK)); }
            set { SetData(QcConfigTable.C_REMARK, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(QcConfigTable.C_STATUS)); }
            set { SetData(QcConfigTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

